package cn.supermarket.springutil;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringUtil {
	private static final ApplicationContext con = new ClassPathXmlApplicationContext("app*.xml");
	
	private SpringUtil() {
	}
	
	public static Object getBean(Class id){
		return con.getBean(id);
	}
	
	public static Object getBean(String id){
		return con.getBean(id);
	}

}
